public class ExtendsDemo07 {
    public static void main(String[] args) {
        Teacher python = new Teacher();
        python.age = 30;
        python.name = "老王";
        python.eat();
        python.sleep();
    }

}

class Person {
    public String name;
    public int age;

    public void say() {
        System.out.println("say chinese");
    }

    public void sleep() {
        System.out.println("睡觉");
    }

    public void eat() {
        System.out.println("吃饭");
    }

}

class Teacher extends Person {

}

class Student extends Person {

}




